1. Technical Field
The present invention relates to a clock generating device, an electronic apparatus, a moving object, and a clock generating method.
2. Related Art
JP-A-2006-309479 discloses a clock correction circuit that counts the number of pulses of a main clock included in one cycle of a sub clock output by a crystal oscillation circuit, uses the counted number of pulses and a predetermined reference number of pulses, and masks and outputs a portion of the main clock so that the number of pulses of the main clock included in one cycle of the sub clock is identical to the reference number of pulses.
In the clock correction circuit suggested in JP-A-2006-309479, it is preferable to compensate the sub clock in temperature since the frequency stability of the output clock deteriorates if the frequency of the sub clock changes. However, in a circumstance in which the temperature rapidly changes, the update cycle of the temperature compensation value is too long, and thus the frequency change of the sub clock caused by the temperature change is not sufficiently corrected and the frequency stability of the output clock deteriorates. On the contrary, in a circumstance in which the temperature slowly changes, the update cycle of the temperature compensation value is too short, and thus the electric current accompanied by the update of the temperature compensation value may be wastefully consumed.